{extends file="../global.html"}
{block name=body}
 <form class="layui-form" action="{url('run/highlights/update')}" style="width: 90%;" method="post" enctype="multipart/form-data">
 <div class="layui-form-item">
  <div class="layui-input-block">
	<button class="layui-btn">
	  <i class="layui-icon">&#xe603;</i> 返回商品列表

	</button>
	</div>
  </div>
   <div class="layui-form-item">
     <label class="layui-form-label">所属车系名</label>
     <div class="layui-input-block">
       <select name="goods_name" lay-verify="required">
        
         <option value="{$res.goods_name}" selected="">{$res.goods_name}</option>
 		 
       </select>
     </div>
   </div>

  <div class="layui-form-item">
    <label class="layui-form-label">亮点标题</label>
    <div class="layui-input-block">
      <input type="text" name="car_title" required  lay-verify="required" value="{$res.car_title}" autocomplete="off" class="layui-input">
    </div>
  </div>
  <input type="hidden" name="pic" value="{$res.car_img}">
  	  <div class="layui-form-item">
  		   <label class="layui-form-label">商品封面图片</label>

  		  <input type="file"  class="layui-btn" style="width:10%;background:#6E6266" name="car_img" id="imgPicker">

  		  <img id="preview" width="500"  src="{$absroot}{$res.car_img}" />
    	</div>
   
   <div class="layui-form-item layui-form-text">
     <label class="layui-form-label">亮点内容</label>
     <div class="layui-input-block">
       <textarea name="car_content" class="layui-textarea">{$res.car_content}</textarea>
     </div>
   </div>
   <input type="hidden" value="{$res.car_id}" name="car_id">
   <div class="layui-form-item">
     <div class="layui-input-block">
       <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
       <button type="reset" class="layui-btn layui-btn-primary">重置</button>
     </div>
   </div>
 </form>
  
 <script>
 pic();

 //Demo
 layui.use('form', function(){
   var form = layui.form();
   
   //监听提交
  /* form.on('submit(formDemo)', function(data){
     layer.msg(JSON.stringify(data.field));
     return false;
   });*/
 });
 </script>
{/block}